{include file="public/_meta" /}

<body>
<div class="wrapper">

    {include file="public/_header" /}

    <!-- Sidebar -->
    {include file="public/_menu" /}
    <!-- End Sidebar -->

    <div class="main-panel">

        <div class="content">
            <div class="page-inner">

                <!-- 面包屑 -->
                {include file="public/_page_header" /}


                <div class="row">
                    <div class="col-md-12">
                        <div class="card">
                            <div class="card-header">

                                <form class="row">


                                    <div class="col-md-6 col-lg-3">
                                        <div class="form-group" id="demo1">
                                        </div>
                                    </div>

                                    <div class="col-md-6 col-lg-3">
                                        <div class="form-group" id="demo2">
                                        </div>
                                    </div>

                                    <div class="col-md-6 col-lg-3">
                                        <div class="form-group">
                                            <input type="text" class="form-control" name="start_time" id="start_time" value="{$start_time}" placeholder="开始时间" autocomplete="off">
                                        </div>
                                    </div>
                                    <div class="col-md-6 col-lg-3">
                                        <div class="form-group">
                                            <input type="text" class="form-control" name="end_time" id="end_time" value="{$end_time}" placeholder="结束时间" autocomplete="off">
                                        </div>
                                    </div>


                                    <div class="col-md-6 col-lg-3">
                                        <div class="form-group">
                                            <button type="submit" class="btn btn-primary">查询</button>
                                            <a href="{:url('clue/dayTIme')}" class="btn btn-info" style="color: white;position: absolute;left: 110px;">重置</a>
                                        </div>
                                    </div>
                                </form>

                            </div>

                            <div class="layui-card-body">

                                <blockquote class="layui-elem-quote layui-quote-nm">
                                    <span style="margin-right: 50px;">总进线数量：{$allNum}</span>

                                </blockquote>
                            </div>

                            <div class="card-body">


                                <div class="table-responsive">
                                    <table id="add-row" class="display table table-striped table-hover">
                                        <thead>
                                        <tr>
                                            <th>时段</th>
                                            <th>进线数量</th>
                                            <th>占比</th>

                                        </tr>
                                        </thead>

                                        <tbody>

                                        {volist name="systemLogs" id="vo"}
                                        <tr>
                                            <td>{$vo.time}</td>

                                            <td>{$vo.num}</td>
                                            <td>{$vo.rate}%</td>
                                        </tr>
                                        {/volist}

                                        </tbody>
                                    </table>

                                    <!-- 分页 (调取通用方法)-->

                                </div>
                            </div>
                        </div>
                    </div>
                </div>


            </div>
        </div>

        {include file="public/_footer" /}


    </div>


</div>

{include file="public/_js" /}

</body>
<script>


    var SCOPE = {
        'item_url':"{:url('system/edit')}",
    };
    laydate.render({
        elem: '#start_time'
        ,type: 'datetime'
    });
    laydate.render({
        elem: '#end_time'
        ,type: 'datetime'
    });

    function edit_item(id)
    {

        $.ajax({
            type: 'GET',
            url: SCOPE.item_url,
            dataType: 'json',
            data: {id:id},
            success: function(res){
                if(res.code == 1001){
                    layer.open({
                        type: 1,
                        area: '500px',
                        content: '<p style="padding: 20px">'+res.data.content+'</p>' //这里content是一个普通的String
                    });
                }else{
                    layer.msg(res.msg,{icon:2,time:2000});
                }

            },
            error:function(res) {
                layer.msg('网络错误,稍后再试...',{icon:2,time:2000});
            }
        });


    }




</script>

<script src="__STATIC__/layui/xm-select.js"></script>
<script>
    var channelStr= '{$channel_id}';
    var channel_arr = channelStr.split(","); // 使用空格作为分隔符
    var aData1= JSON.parse('{$channel}')
    var demo1 = xmSelect.render({
        el: '#demo1',
        filterable: true,
        name: 'channel_id',
        layVerify: 'required',
        initValue: channel_arr,
        language: 'zn',
        toolbar: {
            show: true,
            list: [ 'ALL', 'CLEAR', 'REVERSE' ]
        },
        data: aData1
    })



    var accountStr= '{$account_id}';
    var account_arr = accountStr.split(","); // 使用空格作为分隔符

    var aData2= JSON.parse('{$account}')
    var demo2 = xmSelect.render({
        el: '#demo2',
        filterable: true,
        name: 'account_id',
        layVerify: 'required',
        initValue: account_arr,
        language: 'zn',
        toolbar: {
            show: true,
            list: [ 'ALL', 'CLEAR', 'REVERSE' ]
        },
        data: aData2
    })

</script>

</html>